<template>
    <div>
        <van-nav-bar title="商品搜索" left-text="返回" left-arrow @click-left="($router.push('/cla'))" />
        <van-search v-model="value" placeholder="请输入搜索关键词" />
        <van-cell-group v-for="item in qsearch">
            <van-cell :title="item.goods_id"  />
           
        </van-cell-group>


    </div>
</template>

<script setup>
import { ref, watch } from 'vue';
import { qsearchApi } from '@/api/api';
let search = ref([])
let value = ref([])
watch(value, (val) => {
    qsearchApi(val).then(res => {
        console.log('搜索数据', res)
        search.value = res.data.messgae

    })
})

</script>

<style lang="scss" scoped></style>